export default function Drow(root,user,online,noOnline){
  //获取Dom节点
  let chartDom = this.$refs.Jur_Dom;
  //初始化echarts实例
  let myChart = this.$echarts.init(chartDom);
  //绘制图标
  let option;
    option = {
      backgroundColor: "#1A1835",
      
      title: [{
        text: 'User Information Display',
        left: 'center'
      },
      {
        text:"User permission display",
        left:"15%",
        top:"75%"
      },
      {
        text:"The number of online",
        left:"68%",
        top:"75%"
      }
      ],
      tooltip: {
        trigger: 'item'
      },
      legend: {
        orient: 'vertical',
        left: 'left'
      },
      series: [
        {
          name: 'User permission display',
          type: 'pie',
          radius: '30%',
          center: ['25%', '50%'],
          data: [
            { value: root, name: 'root' },
            { value: user, name: 'user' },
          ],
          emphasis: {
            itemStyle: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        },
        {
          name: 'The number of online',
          type: 'pie',
          radius: '30%',
           center: ['75%', '50%'],
          data: [
            { value: online, name: 'online' },
            { value: noOnline, name: 'no-online' },
          ],
          emphasis: {
            itemStyle: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    option && myChart.setOption(option);
}
